Title: Year 12 / Computer Science / Theory / 8 - Databases / 8.1 - Database Concepts

Q: Explain what is meant by a file based database
A: data is stored in discrete files stored on computer and can be accessed, altered or removed by the user

Q: Explain what is meant by a relational database
A: data is stored across 2 or more tables

Q: Describe 6 limitations of a flat file database
A: no enforcing control on organisation of files, data repeated in different file so each one has to be manually changed,
sorting has to be done manually or program written,
data might be in different format, so difficult to find and use
impossible for it to be multi user,
no security so users can access everything

Q: Explain what is meant by data integrity
A: the correctness, reliability and accuracy of data

Q: Explain why there may be problems with data integrity in a flat file database
A: data may not be up to date and accurate
more often data has been recorded, the higher the chance of data error or inconsistency

Q: Explain why there may be problems with data privacy in a flat file database
A: all data is held in 1 file, so its available for everyone to see, as some people only need access to certain data
sensitive data needs to be held separately

Q: State the advantages of using a flat file database
A: simple to create
easy to use
inexpensive

Q: Explain what is meant by data redundancy
A: when the same data is stored multiple times

Q: Explain what is meant by data dependency
A: the way data is organised in a database and the techniques used to access it

Q: Explain 5 benefits of using a relational database instead of a flat file databases
A: - data duplication is controlled in relational database, as data is stored in separate linked tables
- data integrity issues are addressed as data only needs to be stored and updated once
- accidental deletion is more difficult, as dbms will flag errors
- complex queries can be made more easily due to relational database's configuration
- fields can be added or removed without effect on existing programs

Q: Describe how a relational database is different to a flat file one
A: it has a schema, so it shows how a database is divided into tables with fields and shows how theyre related

Q: Describe what is meant by a schema
A: blueprint of how a database is constructured

Q: State the layers of a database system
A: users, database application, dbms, database

Q: Users are a layer of the database system. Explain what this means
A: people who use the database, can be software programs as well since they rely on the data

Q: The database application is a layer of the database system. Explain what this means
A: program that users interact with, it relies on the database but cant access the db directly, must use dbms to access the data

Q: The DBMS is a layer of the database system. Explain what this means
A: acts as a gatekeeper and restricts users and database apps from gaining direct access to db, so its controls the data. it will have some rules to maintain quality of the data.

Q: The database is a layer of the database system. Explain what this means
A: actual database where raw data is stored into separate relational tables, its protected by the dbms and databse app layers above it

Q: Describe the use for a DBMS
A: controls all aspects of a database

Q: State 5 features of DBMS'
A: creating or editing tables
inserting or editing tables
extract and use external data sets
run queries
produce forms, graphs reports

Q: Explain what type of database relationship this shows:
A: one to one

Q: Explain what type of database relationship this shows:
A: one to many

Q: Explain what type of database relationship this shows:
A: many to many

Q: State the requirements needed for a database to be in 1st Normal Form (1NF)
A: contains no repeating attribute or groups of attributes, all data values are atomic (single valued), no duplicate records

Q: State the requirements needed for a database to be in 2nd Normal Form (2NF)
A: its in 1NF, every non-primary key attribute is dependent on the primary, no incomplete dependencies

Q: State the requirements needed for a database to be in 3rd Normal Form (3NF)
A: its in 2NF, and every non primary key attribute is fully dependent on primary key, not any other non key attributes, no interdependencies between attributes

Q: Explain what is meant by a partial/incomplete dependency
A: when a field that is not a primary key does not depend entirely on the primary key(s)

Q: Explain what is meant by a transitive dependency/inter-dependency
A: when a field that is not a primary key depends on any other field that is not a primary key

Q: State what is meant by a database
A: collection of non redundant interrelated data

Q: State what is meant by an entity
A: object/event which can be distinctly identified

Q: State what is meant by a table
A: contains group of related entities in rows and columns called an entity set

Q: State what is meant by a tuple
A: a row or record in a relation

Q: State what is meant by an attribute
A: a field or column in a relation

Q: State what is meant by a primary key
A: attribute or combination of them that uniquely defines each tuple in relation

Q: State what is meant by a candidate key
A: attribute that can potentially be a primary key

Q: State what is meant by a foreign key
A: attribute or combination of them that relates 2 different tables

Q: State what is meant by referential integrity
A: prevents users or applications from entering inconsistent data

Q: State what is meant by secondary key
A: candidate keys that are not the primary key

Q: State what is meant by indexing
A: creating a secondary key on an attribute to provide fast access when searching on that attribute, indexing data must be updated when table data changed